{{ if .GitInfo }}
    {{ if and .Site.Params.enablePostGitInfo (.Params.gitinfo | default .Site.Params.displayPostGitInfo) }}
        <div class="post-gitinfo">
            {{ if or .Site.Params.displayCommitHash .Site.Params.displayCommitMessage }}
                <div class="post-gitinfo-left">
                    {{ if .Site.Params.displayCommitHash }}
                        <div class="gitinfo-item commit">
                            {{- with .Site.Params.repoURL -}}
                                <a href="{{ . }}/commit/{{ $.GitInfo.Hash }}" target="_blank" rel="noopener">
                                    {{- partial "utils/icon.html" (dict "$" $ "name" $.Site.Params.gitIcon "class" "git-icon") -}}
                                    {{- $.GitInfo.AbbreviatedHash -}}
                                </a>
                            {{- else -}}
                                {{- partial "utils/icon.html" (dict "$" $ "name" $.Site.Params.gitIcon "class" "git-icon") -}}
                                {{- $.GitInfo.AbbreviatedHash -}}
                            {{- end -}}
                        </div>
                    {{ end }}
                    {{ if .Site.Params.displayCommitMessage }}
                        {{ with .GitInfo.Subject }}
                            <div class="gitinfo-item commit-msg">
                                {{- partial "utils/icon.html" (dict "$" $ "name" $.Site.Params.msgIcon "class" "msg-icon") -}}
                                {{- . -}}
                            </div>
                        {{ end }}
                    {{ end }}
                </div>
            {{ end }}
            {{ if or .Site.Params.displayFeedback .Site.Params.displayEditLink }}
                <div class="post-gitinfo-right">
                    {{ if .Site.Params.displayFeedback }}
                        {{ with .Site.Params.repoURL }}
                            <div class="gitinfo-item feedback">
                                <a href="{{ . }}/issues" target="_blank" rel="noopener">
                                    {{- partial "utils/icon.html" (dict "$" $ "name" $.Site.Params.feedbackIcon "class" "feedback-icon") -}}
                                    {{- $.Site.Params.feedbackText -}}
                                </a>
                            </div>
                        {{ end }}
                    {{ end }}
                    {{ if .Site.Params.displayEditLink }}
                        {{ with .Site.Params.repoEditURL }}
                            {{ $contentDir := (cond $.Site.IsMultiLingual (printf `/%s/` $.Site.Params.contentDir) "/content/") }}
                            <div class="gitinfo-item edit">
                                <a href="{{ . }}{{ $contentDir }}{{ $.Path }}" target="_blank" rel="noopener">
                                    {{- partial "utils/icon.html" (dict "$" $ "name" $.Site.Params.editIcon "class" "edit-icon") -}}
                                    {{- $.Site.Params.editText -}}
                                </a>
                            </div>
                        {{ end }}
                    {{ end }}
                </div>
            {{ end }}
        </div>
    {{ end }}
{{ end }}
